import request from '@/utils/request'

export function submit(data) {
  return request({
    url: 'buss/supervisorlog/add',
    method: 'post',
    data
  })
}

export function getOne(id) {
  return request.get('buss/supervisorlog/getOne?id='+id)
}
export function buildUnit(contractId) {
  return request.get('buss/supervisorlog/getBuildUnit?contractId='+contractId)
}
export function listPage(data) {
  return request.post('buss/supervisorlog/listPage', data)
}

export function del(ids) {
  return request({
    url: 'buss/supervisorlog/del',
    method: 'post',
    data: ids
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/supervisorlog/edit',
    method: 'post',
    data
  })
}

export function getCompanyByContractId(contractId) {
  return request.get('buss/supervisorlog/getCompanyByContractId?contractId='+contractId)
}

export function getFillUnit(data) {
  return request.post('buss/supervisorlog/getFillUnit', data)
}

export default {
  submit,
  getOne,
  del,
  resubmit,
  listPage,
  getCompanyByContractId,
  getFillUnit,buildUnit,
}
